Skip to content

fix(preview): isolate archived previews from studio sessions - #187

Open
AlexXPZhu wants to merge 6 commits into
Tencent:mainfrom
AlexXPZhu:fix/preview-session-isolation
Open

AlexXPZhu wants to merge 6 commits into
Tencent:mainfrom
AlexXPZhu:fix/preview-session-isolation

Conversation

@AlexXPZhu

@AlexXPZhu AlexXPZhu commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

What changed

Fixes #93.

An archived preview could share the studio origin and use parent.fetch with the viewer's signed-in session. Previews now require a dedicated hostname and explicit studio frame origins.

  • Serve preview tokens only on the preview hostname; never route studio pages, API endpoints or MCP through that hostname. Reject the same hostname even with a different port.
  • Use the configured preview origin instead of request/forwarding headers. Reject studio hostnames as preview backends, including when reading previously persisted sessions.
  • Restrict resource requests as well as connections: preview content cannot send image/script/iframe requests to studio endpoints. Keep ES modules and the existing History API shim working on the isolated origin.
  • Allow the validated preview origin in the studio root pages' frame-src, using the same service configuration as the gateway. Keep chatbot/VS Code policies unchanged. Use server-issued preview URLs unchanged for embedding, copying and opening a standalone window.
  • Add service/API regressions and a real Chromium test through the archive and platform gateway with a signed viewer cookie. The fixture parent runs through the complete production middleware, including the studio CSP, and loads an external script. The test bypasses the optional backend interceptor and checks parent access, native fetch, no-cors, images, modules, CSS, navigation/Back, and standalone viewing. Include it in CI's isolated browser-test step.

Scope

  • Platform core / API / runner
  • Public adapter / deployment
  • Classic
  • Portable
  • Shared behavior contract
  • Installer / CLI
  • Documentation only

Compatibility

Deployment configuration is required to reopen online previews:

AGENTFLOW_PREVIEW_PUBLIC_URL=https://preview.example.net
AGENTFLOW_PREVIEW_FRAME_ANCESTORS=https://studio.example.com

The second value accepts space-separated exact studio origins. Route both hostnames to the platform while preserving Host; deployment docs include proxy and local-development examples. Until configured, session creation returns an explicit error. Archiving and the authenticated ZIP download API remain available. Existing studio-origin preview links return 404.

Configure an HTTPS preview URL when the studio uses HTTPS; the client no longer probes or rewrites the URL.

Bundle external scripts/styles/fonts locally. Nested frames and workers/service workers are blocked. Configured non-studio backends still need their own CORS support. Preview producers share the dedicated preview origin; this change does not provide isolation between previews.

No SQL migration, schema change or runner protocol change. Classic and Portable are unchanged.

Validation

Passed locally for the updated tree:

  • bash scripts/build-chatbot.sh: 299 tests and production build.
  • npm --prefix webtest test: 164 tests.
  • Non-browser Go suite: go test -p=2 ./... -count=1 -timeout=180s -skip "$REAL_BROWSER_TESTS", with the five-test pattern from .github/workflows/platform.yml.
  • All five real Chromium tests, run separately with -p=1 in internal/httpapi, internal/runner and internal/runtime.
  • 14 CSP configuration cases cover isolated HTTP/HTTPS origins, ports, invalid/missing settings, same-hostname variants, injection attempts, and unchanged policies on other pages. UI regressions cover session loading, frame preservation during refresh, backend changes, copying and standalone URLs.
  • go vet ./..., python3 scripts/check-public.py, bash scripts/scan-secrets.sh, and staged diff checks.

The initial non-browser command included global Git environment overrides, which interfered with test fixtures and helper builds. After removing those overrides, the engine/runtime/runner package suites passed on rerun; all other packages had passed in the full run. Go 1.26.11 and local Chromium with its system libraries were used.

Negative control for this review: registering the browser test parent on the production router while retaining the pre-fix production code (81c53b7) fails with parent CSP blocked frame-src. The updated code passes with and without a configured backend, embedded and standalone, while parent access and studio API/image requests remain blocked.

Not run: the full MySQL-backed public Playwright suite, Firefox/WebKit, or a live DNS/TLS proxy deployment. Local-edition checks are not applicable.

Safety

  • I did not include credentials, internal endpoints, production data, or organization-specific infrastructure.
  • I preserved user files and unrelated changes.
  • I updated generated Classic host bundles when applicable. — Not applicable.
  • I documented third-party content and licensing changes when applicable. — No new dependencies or third-party assets.

Prepared with Codex assistance.

Require a dedicated preview hostname and explicit studio frame origins.
Keep platform routes off the preview host and reject studio backends.
Cover authenticated browser isolation, module loading and SPA navigation.
@Robert0622

Robert0622 commented Nov 11, 2026 •

Copy link
Copy Markdown
Collaborator

LoopForge PR Review — commit c21a3d3a92422a24e389d9cf934964212b4157f0

Result: Verification blocked

Verified in this round (isolated, credential-free sandbox):

  • go test ./internal/preview/... (the new origin-isolation/CSP/gateway logic in config.go, gateway.go, origin.go, service.go) — all pass, including the negative-control style cases described in the PR body: TestPreviewRequiresIsolatedOrigin (unconfigured / same-host / same-host-different-port / wildcard / parent_* variants), TestGatewayNavigationHeadersAndCSP, TestStrayNavigationTargetReturnsToPreview, TestStrayPreviewNavigation, archive/zip hardening tests, DB store round-trip. No failures.
  • go vet ./internal/preview/... — clean.

Not verifiable this round:

  • internal/httpapi (where the CSP is actually wired into the studio router: run_preview.go, server.go, gin_helpers.go) and web/ cannot be built in this review sandbox: go build/go test fail with pattern all:native-chat: no matching files found, because the embedded chatbot bundle requires bash scripts/build-chatbot.sh, which itself requires Node ≥ 22 (sandbox has Node 20). This also reproduces on main, so it's a sandbox/tooling gap rather than something this PR introduced — but it means this PR's own preview_isolation_browser_test.go, preview_security_headers_test.go, run_preview_test.go, and the frontend web/preview_session_test.js / webtest/tests/runs-actions.test.mjs are unexercised by me.
  • GitHub Actions for this exact commit (platform, e2e, validate) show action_required — they have not actually run yet, pending a maintainer's approval of the workflow run. So the extensive local validation described in the PR body (299 chatbot tests, 164 webtest, the real Chromium suite, 14 CSP cases) is not yet corroborated by CI for c21a3d3a9.

To close this out: (a) a maintainer approves/triggers the CI run for this SHA so platform/e2e/validate actually execute, or (b) a review sandbox with Node ≥ 22 and a prebuilt web/native-chat to run the httpapi/web suites directly. I'll re-check the httpapi-layer tests and the real browser suite once either is available.

@AlexXPZhu could you, or a maintainer with approval rights, approve the pending workflow run for this commit so CI actually executes? I can't confirm who holds approval rights on this repo — please route to whoever does if that's not you.

Automated review by LoopForge PR bot.

Share the validated preview origin with studio security headers and keep session URLs unchanged in the UI. Exercise the parent through the production middleware, cover invalid configurations and other page policies, and verify preview refresh and backend changes.
@AlexXPZhu

Copy link
Copy Markdown
Contributor Author

@crispinhu27 你好,想麻烦你看一下这个 PR。

fx-kurumi 上一轮提的工作台 frame-src 问题已经在 c21a3d3 修掉了,对方复审后也撤销了 Request changes,所以现在还差一个 approve。

另外 platform、e2e、validate 这三个 workflow 一直停在 action_required,我这边是 fork,没法自己触发,得麻烦有权限的同学点一下批准。自动评审那条 "Verification blocked" 也是同一个原因:它的沙箱 Node 版本不够,构建不了 internal/httpapi,CI 跑起来就能补上这部分。

如果 CI 里 TestPreviewIsolationBrowser 因为 Chromium 起不来而挂了,跟我说一声,我来处理。#268 也动了 gateway.go,哪个先合我都可以 rebase。

谢谢!

@crispinhu27

Copy link
Copy Markdown
Collaborator

复查当前 head c21a3d3:工作台 frame-src 修复已通过真实 Chromium 测试,另有下面两个可复现问题,建议合并前处理。

[P1] FRAME_ANCESTORS 无效时,预览域名的平台路由封锁会失效

位置:internal/preview/origin.go:74-76(IsPreviewHost),调用方为 internal/httpapi/run_preview.go 的 previewHost 中间件。

IsPreviewHost 依赖整套 isolatedOrigins() 校验成功,因此已配置 AGENTFLOW_PREVIEW_PUBLIC_URL,但 AGENTFLOW_PREVIEW_FRAME_ANCESTORS 缺失或误填为 'self' 时,会返回 false;中间件随后将该预览域名上的普通请求交给平台路由。

复现配置:

AGENTFLOW_PREVIEW_PUBLIC_URL=https://preview.example.test
AGENTFLOW_PREVIEW_FRAME_ANCESTORS=https://studio.example.test

先使用上述完整配置,再将第二项清空或改为 'self',保持 PUBLIC_URL 不变:

请求(均为预览域名) 完整配置 FRAME_ANCESTORS 为空或 'self'
GET https://preview.example.test/ 404 200,返回工作台页面
GET https://preview.example.test/api/health 404 200
GET https://preview.example.test/api/auth/current 404 200

另用 AGENTFLOW_APP_DOMAIN=example.test、生产 setAuthCookie 签发的测试登录 Cookie 和浏览器规则一致的 CookieJar 验证:完整配置时预览域名返回 404;FRAME_ANCESTORS 为空时,该域名上的 /api/auth/current 返回 200,并识别出 Studio 测试登录用户。以上在 httpapi.New 的完整中间件链和临时 SQLite 中复现。

这使一次嵌入配置遗漏同时打开了预览域名的平台路由;已有预览文档在服务重启后仍可能继续运行,配置了后端的预览 CSP 也允许连接 'self'。建议将“匹配并保留预览主机名”与“允许签发/嵌入预览”分开:即便 FRAME_ANCESTORS 无效,也应保持该主机上的平台页面/API 返回 404,并拒绝签发会话。请补上缺失/无效 FRAME_ANCESTORS 下的主机隔离测试。

[P2] 会话校验失败后,ZIP 下载和后端修正入口同时消失

位置:internal/preview/service.go:600-604 新增会话校验;相关前端为 web/app/runs.js:741-742,759-761。

两个升级场景均可复现:

  1. Run 的静态包已归档、元数据接口返回 ready,但管理员尚未配置独立预览域名。会话接口返回 409,loadRunPreview 进入 catch 并将已经拿到的归档 info 清空。页面只显示“预览加载失败/重试”,原本仍可正常使用的 ZIP 下载 API 没有按钮入口。
  2. 独立域名配置正确,但升级前保存的 backendUrl 指向 Studio。新校验返回 400,前端同样只剩错误和重试,“更改后端”按钮也消失,用户无法从界面把旧地址改为合法后端或清空,只能手动调用 API。

建议保留 ready 归档信息,让 ZIP 下载和后端设置独立于会话创建结果;会话失败时显示具体错误,同时保留下载/修改后端入口。请覆盖上述 409 和历史后端 400 的 UI 回归。

验证:go test ./internal/preview ./internal/engine ./internal/httpapi ./web -run 'Preview' -short -count=1 -timeout=180s 通过;TestPreviewIsolationBrowser 单独用真实 Chromium 运行通过。上述异常配置路由/Cookie 用例和前端错误分支另行复现确认。测试均使用本地临时数据,未访问实际数据库。

…ession errors

Reserve the configured preview hostname from AGENTFLOW_PREVIEW_PUBLIC_URL
alone. A missing or invalid AGENTFLOW_PREVIEW_FRAME_ANCESTORS now only
disables sessions and the studio frame-src allowance; studio pages and APIs
keep returning 404 on the preview hostname, and the gateway serves sessions
only with a complete isolation configuration.

A hostname listed in FRAME_ANCESTORS or used by AGENTFLOW_PUBLIC_URL is a
studio and is never reserved: earlier docs described the preview URL as the
studio's own origin, and reserving it would take that studio offline. While
isolation is incomplete, the reserved host's 404 explains the configuration
and startup logs a warning. Compose forwards AGENTFLOW_PUBLIC_URL.

Session and backend errors carry stable codes (preview_isolation_required,
preview_backend_on_studio). Clearing a stored backend is always allowed, and
a saved backend without a following session reports sessionError. The run
preview tab keeps the ready archive when only the session fails: ZIP
download, backend change/clear and refresh stay available with a specific
explanation.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@AlexXPZhu

Copy link
Copy Markdown
Contributor Author

@crispinhu27 @fx-kurumi 感谢复现,两条问题已在 4bf63d2 修复。

[P1] 预览域名的保留与 FRAME_ANCESTORS 解耦

  • IsPreviewHost 现在只看 AGENTFLOW_PREVIEW_PUBLIC_URL 的 hostname(reservedOrigin()),不再依赖整套 isolatedOrigins()。FRAME_ANCESTORS 缺失、为 'self'、含通配符/路径时,只停用会话签发和 CSP 放行,预览域名上的 /、/api/*、/mcp、/chatbot/ 等仍返回 404(带合法 Studio Cookie 也一样)。
  • 网关 ServeHTTP 另外要求完整的隔离配置:配置被改坏后,之前签发的会话也不再提供内容。
  • 没有完全照搬“只要 PUBLIC_URL 能解析就保留”:改动前的设计文档把 AGENTFLOW_PREVIEW_PUBLIC_URL 写成 Studio 自己的对外 origin(如 https://loopforge.example.com)。按原样保留的话,沿用旧配置的部署升级后整个 Studio 都会 404。所以如果这个 hostname 同时出现在 FRAME_ANCESTORS 或 AGENTFLOW_PUBLIC_URL 里,就认定它是 Studio,不保留(会话依然拒绝签发)。除此之外一律保留,失败时不放行(fail closed)。为了让运维排查这种情况,配置不完整时预览域名的 404 正文会说明原因,启动日志也会打印 WARNING。Compose 同时转发了 AGENTFLOW_PUBLIC_URL。docs/deployment.md 补充了升级说明。

[P2] 会话失败不再清掉归档入口

  • 后端:会话/后端错误带稳定的 code:preview_isolation_required(409)、preview_backend_on_studio(400)。清空后端(PUT backendUrl:"")在未配置隔离时也允许。保存成功但随后签发会话失败时,响应带 sessionError,前端不会一直停在“正在签发预览会话”。
  • 前端:loadRunPreview 对会话请求单独 try/catch,保留 ready 的 info。previewPaneHTML 在没有会话时仍渲染工具栏(下载静态文件、更改/清空后端、刷新),按错误码显示具体提示和服务端原因。复制地址/独立窗口只在有会话时出现。元数据请求失败时,仍显示原来的“预览加载失败/重试”。

测试

新增的回归测试先在未修改的 c21a3d3 上确认失败,再在修复后通过:

  • internal/httpapi/preview_host_reservation_test.go:走 httpapi.New 完整中间件 + 签名登录 Cookie。FRAME_ANCESTORS 为合法值、空、'self'、通配符、'self' https://studio… 时,预览域名(含其他端口、大小写和末尾点)的平台页面/API 均为 404,Studio 侧作为对照返回 200。c21a3d3 上同样的用例返回 200。另外覆盖了旧配置(PUBLIC_URL 指向 Studio)下 Studio 仍可用;409/400 的 code、ZIP 下载 200、清空历史 Studio 后端后能重新签发会话并打开预览。
  • internal/preview/origin_test.go:保留/不保留 hostname 的判断、网关需要完整隔离(有正向对照)、未配置隔离时清空后端。
  • web/preview_session_test.js:409 和历史后端 400 两种 UI 回归,检查下载、更改后端、刷新都还在,复制/独立窗口不出现,以及提示文本。同时覆盖后台刷新重试、从面板清空后端后恢复 iframe(400)或给出明确原因(409),元数据失败路径不变。c21a3d3 上失败于 archive info dropped。

本地全量验证(Go 1.26.11,修复后的分支,另在与最新 main(b751e09)试合并的临时树上重复一遍,均无冲突):

  • gofmt、go vet ./... 通过。
  • 非浏览器 Go 全量:go test -p=2 ./... -skip "$REAL_BROWSER_TESTS" 通过(分支 28 个包;试合并树 29 个包)。
  • 5 个真实 Chromium 测试(含 TestPreviewIsolationBrowser)通过,分支和试合并树都跑了。
  • npm --prefix webtest test:分支 164/164,试合并树 175/175 通过。
  • python3 scripts/check-public.py、bash scripts/scan-secrets.sh、git diff --check 通过。

未跑:MySQL 版 Playwright、Firefox/WebKit、真实 DNS/TLS 反代部署。

@Robert0622

Copy link
Copy Markdown
Collaborator

LoopForge PR Review — head 4bf63d2788b883d0e5c67a1a85306480f0a38b2d

Verdict: ❌ Not pass — @AlexXPZhu

  • Re-review: head moved from c21a3d3a92422a24e389d9cf934964212b4157f0 (previously "Verification blocked" — CI showed action_required, pending workflow approval).
  • That blocker is resolved: all 16 required checks are green on this exact head (platform-required, e2e-required, core, browser, validate 3.8/3.12, secrets, curl-install, first-run, tcmcp, 4×e2e, e2e-browser, opensource scan).
  • New blocker found instead: this PR now has a real merge conflict with current main. git merge-tree origin/main pr-187 reports CONFLICT (content) in .github/workflows/platform.yml, and GitHub confirms mergeable: false / mergeable_state: dirty. Both sides edited the same REAL_BROWSER_TESTS regex line in the core job's env: block — main added TestBrowserScrollEndsOnASharpFrame (via fix(browser): capture a sharp frame when the settled screencast sends none #628) while this PR adds TestPreviewIsolationBrowser; git can't auto-merge that single line.
  • Did not re-read the preview-isolation logic (internal/preview/*, CSP wiring in internal/httpapi) line-by-line this round since the blocker here is purely merge mechanics, not a logic defect; last round's read found no correctness issues there and CI now corroborates it on this head.

Blocking: rebase/merge main into this branch and keep both test names in REAL_BROWSER_TESTS (...|TestBrowserScrollEndsOnASharpFrame|TestPreviewIsolationBrowser) in .github/workflows/platform.yml, then push so CI reruns on a clean head — @AlexXPZhu.

@Yanami-2K Yanami-2K left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

整体方向与 #93 的验收项一致:预览改为独立 hostname(internal/preview/origin.go 的 isolatedOrigins/reservedOrigin),预览域名上的平台路由一律 404(internal/httpapi/run_preview.go previewHost()),后端地址禁止指向工作台 hostname 且在 gateway.go ServeHTTP 中对已存会话重新校验,预览 CSP 收紧为 default-src 'none' 并补了真实 Chromium 回归 TestPreviewIsolationBrowser,CI 全绿。但目前还不能合入:

  1. 与 main 冲突(mergeableState=dirty):请先 rebase 到最新 main 并解决冲突。本 PR 改了 internal/httpapi/server.go(securityHeaders(e.Preview()))、internal/httpapi/gin_helpers.go(securityHeaders 签名)、web/app/runs.js 等高频改动文件,rebase 后请确认 securityHeaders 的所有调用点都已传入 preview service,并重跑 TestPreviewStudioCSP、TestPreviewIsolationBrowser、TestPreviewAPIAndPathGateway。
  2. internal/httpapi/server.go 中 securityHeaders(e.Preview()) 在构建路由时只取一次 PublicOrigin():如果 preview service 在 New(...) 之后才通过 SetPreview 挂上(或以后支持热更新配置),工作台根页面的 frame-src 不会包含预览 origin,iframe 会被 CSP 拦掉。请在 rebase 时确认 cmd/agentflow/main.go 中 attachPreviewStore 一定先于 httpapi.New 执行,或者改为在中间件里每次请求读取 e.Preview().PublicOrigin(),并加一个顺序相关的测试。

说明:docs/deployment.md、internal/preview/gateway.go、run_preview.go、几个新测试文件的 patch 被截断,internal/preview/service.go、web/app/runs.js、web/preview_session_test.js、web/syntax_test.go、webtest/tests/runs-actions.test.mjs 未返回 patch,这些文件我只能结合 PR 描述判断,没有逐行看全。另外这是对已有部署的破坏性变更(不配 AGENTFLOW_PREVIEW_FRAME_ANCESTORS 就无法在线预览),已在描述和文档中写明,合入前建议维护者确认发布说明里有醒目提示。

Keep both browser tests registered for the Chromium step: the sharp-frame
capture test from main and the preview isolation test from this branch.

Co-Authored-By: Claude Code <noreply@anthropic.com>
@Robert0622

Copy link
Copy Markdown
Collaborator

LoopForge PR Review — head dd5acda22b40c739d06db6a3b8d80801f15f7044

Verdict: ✅ Pass

  • Re-review: head moved from 4bf63d2788b883d0e5c67a1a85306480f0a38b2d (previously ❌ Not pass — merge conflict with main in .github/workflows/platform.yml's REAL_BROWSER_TESTS regex).
  • That conflict is resolved: platform.yml line 13 now keeps both test names — ...|TestBrowserScrollEndsOnASharpFrame|TestPreviewIsolationBrowser — confirmed by reading the merged file at this head; no leftover conflict markers anywhere in the tree (git grep clean).
  • GitHub now reports mergeable: true (still mergeable_state: blocked, which reflects branch-protection/required-reviews, not a conflict).
  • Verified independently in an isolated sandbox (no secrets, no production access), checked out this exact head:
    • go build ./... — succeeded (after building web/native-chat via npm --prefix chatbot ci && npm run build, required for the Go embed to resolve)
    • go test ./internal/preview/... -count=1 — all pass (incl. TestPreviewRequiresIsolatedOrigin matrix, TestGatewayNavigationHeadersAndCSP, TestStrayPreviewNavigation)
    • go vet ./internal/preview/... ./internal/httpapi/... — clean
    • go test ./internal/httpapi/... -run 'CSP|Preview|FrameAncestors' — pass
    • Not re-run this round (unchanged from the last Pass review and not touched by this merge): the browser-driven TestPreviewIsolationBrowser itself (needs real Chromium; covered by CI's browser/e2e-browser jobs, both green on this head) — no code changes to internal/preview/internal/httpapi logic this round, only the CI regex merge conflict fix.
  • CI: 16/16 checks green on this head (platform-required, e2e-required, core, browser, e2e-browser, 4×e2e, validate 3.8/3.12, secrets, curl-install, first-run, tcmcp, opensource scan).

No blocking issues found on this head.

securityHeaders captured e.Preview().PublicOrigin() once when New built
the routes, so a preview service attached via Engine.SetPreview after New
never made it into the studio page's frame-src and the preview iframe was
blocked by the platform's own CSP. Pass e.Preview as a func and read the
origin on each studio request, and add a regression test that attaches the
preview service after New.

Addresses review item 2 from Yanami-2K on Tencent#187.

Co-Authored-By: Claude Code <noreply@anthropic.com>
@Robert0622

Copy link
Copy Markdown
Collaborator

LoopForge PR Review — head 16777434d7209cb8e15972dc3ae2bbe36d350657

Verdict: ✅ Pass

  • Re-review: head moved from dd5acda22b40c739d06db6a3b8d80801f15f7044 (previously ✅ Pass). The only new commit is 1677743 — a targeted fix addressing review item 2 from Yanami-2K: securityHeaders used to capture e.Preview().PublicOrigin() once when New built the routes, so a preview service attached later via Engine.SetPreview never made it into the studio page's frame-src and the preview iframe was blocked by the platform's own CSP. The fix changes securityHeaders to take previews func() *preview.Service and resolve the origin per-request via a new currentPreviewOrigin helper.
  • Checked nil-safety: currentPreviewOrigin guards previews == nil, and (*preview.Service).PublicOrigin / .Enabled() already handle a nil receiver (Enabled() bool { return s != nil }), so a not-yet-attached preview service degrades to an empty origin instead of panicking — confirmed by the new regression test.
  • Verified in an isolated, credential-free sandbox, checked out this exact head via git worktree:
    • go test ./internal/preview/... — all pass (full package, incl. TestPreviewOriginAndBackendBoundaries, TestPreviewNeverReservesStudioHostname, TestPreviewGatewayNeedsCompleteIsolation, etc.)
    • go test ./internal/httpapi/... -run 'TestPreviewStudioCSP|TestPreviewStudioCSPAfterLateSetPreview|TestPreviewDownloadAPI|TestPreviewAPIAndPathGateway|TestPreviewHostReservedWithoutFrameAncestors|TestPreviewLegacyStudioPublicURLKeepsStudio|TestPreviewSessionFailuresKeepArchiveActions' -v — all pass, including the new TestPreviewStudioCSPAfterLateSetPreview added by this commit
    • go test ./web/... -skip 'NativeChatLazyImportsAreEmbedded' — pass (the skipped test only fails locally because this sandbox has no built web/native-chat bundle; same gap reproduces on main and is unrelated to this PR)
    • cd webtest && node --test tests/runs-actions.test.mjs — 2/2 pass
    • gofmt -l on the touched Go files — clean
  • Not re-run this round (unchanged from the prior Pass and not touched by this commit): the real-Chromium TestPreviewIsolationBrowser — covered by CI's browser/e2e-browser jobs, both green on this head.
  • CI: all 16 required/listed checks green on 16777434d7 (platform-required, e2e-required, core, browser, e2e-browser, 4×e2e, validate 3.8/3.12, secrets, curl-install, first-run, tcmcp, opensource scan). GitHub reports mergeable: true; mergeable_state: blocked reflects pending required reviews/branch protection, not a merge conflict.

No blocking issues found on this head.

LoopForge PR Review bot · hourly sweep

@AlexXPZhu

Copy link
Copy Markdown
Contributor Author

@Yanami-2K @crispinhu27 麻烦复查一下当前 head 1677743。

  • Yanami-2K 第 1 条(与 main 冲突):已在 dd5acda 合并 main 解决,REAL_BROWSER_TESTS 两个测试名都保留。
  • Yanami-2K 第 2 条(securityHeaders 只在构建路由时取一次 PublicOrigin()):已在 1677743 改为每次请求读取,并新增顺序相关的回归测试 TestPreviewStudioCSPAfterLateSetPreview。
  • crispinhu27 的 P1/P2:已在 4bf63d2 修复,详见上面的回复。

CI 16 项在当前 head 上全部通过。没有问题的话,麻烦撤销 Request changes / approve,谢谢!

Preserve the current main translation dictionary and all eight preview isolation messages when resolving web/i18n-en.js.

Validated preview package, focused HTTP API/CSP regressions, real Chromium preview isolation, full web package, 206 webtest cases, chatbot build, go vet, public-content checks, and secret scan.
@AlexXPZhu
AlexXPZhu dismissed a stale review via b43ab54 November 17, 2026 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants